/*
 * $Id: CategoryLeaf.java 3 2011-12-26 07:48:43Z forwardly@hotmail.com $
 * 
 * Copyright (c) 2001-2008 Accentrix Company Limited. All Rights Reserved.
 */
package com.lightsaber.trade.as.entity.category;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;

import com.lightsaber.trade.as.entity.planning.CategoryPlanningItem;

@Entity
@DiscriminatorValue("1")
public class CategoryLeaf extends CategoryNode {

    private static final long serialVersionUID = -6988539394264299125L;

    @Column(name = "FUNDING_MODE", nullable = true, length = 100)
    private String fundingMode;
    
    @Column(name = "BUREAU", nullable = true, length = 100)
    private String bureau;

    @OneToMany(mappedBy = "categoryLeaf", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    private List<CategoryProgrammeAttribute> categoryProgrammeAttributes;

    @OneToMany(mappedBy = "categoryLeaf", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    private List<CategoryPlanningItem> categoryPlanningItems;

    @OneToMany(mappedBy = "categoryLeaf", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    private List<SelectedPhraseOut> selectedPhraseOuts;

    public String getFundingMode() {
        return fundingMode;
    }

    public void setFundingMode(final String fundingMode) {
        this.fundingMode = fundingMode;
    }

    public List<CategoryProgrammeAttribute> getCategoryProgrammeAttributes() {
        return categoryProgrammeAttributes;
    }

    public void setCategoryProgrammeAttributes(
            final List<CategoryProgrammeAttribute> categoryProgrammeAttributes) {
        this.categoryProgrammeAttributes = categoryProgrammeAttributes;
    }

    public List<CategoryPlanningItem> getCategoryPlanningItems() {
        return categoryPlanningItems;
    }

    public void setCategoryPlanningItems(final List<CategoryPlanningItem> categoryPlanningItems) {
        this.categoryPlanningItems = categoryPlanningItems;
    }

    public List<SelectedPhraseOut> getSelectedPhraseOuts() {
        return selectedPhraseOuts;
    }

    public void setSelectedPhraseOuts(final List<SelectedPhraseOut> selectedPhraseOuts) {
        this.selectedPhraseOuts = selectedPhraseOuts;
    }

    public String getBureau() {
        return bureau;
    }

    public void setBureau(String bureau) {
        this.bureau = bureau;
    }
}
